package dcutils.rpg;

/**
 * An interface which provides deferred methods to keep track of levels and experiences.<br/>
 * Implementors should define integers to keep track of the current level and xp.
 * @author dca
 */
public interface Experienceable {
   /** Implementors must specify which level the object is at, based on information/experience levels that are important to that object.<br/> */
   public int level();

   /** Implementors must specify how much experience (xp) the object has, based on information that is important to that object.<br/> */
   public long xp();

   /** Implementors must specify how much experience (xp) the object needs in order to advance to the next level.<br/> */
   public long xpToNextLevel();

   /** Implementors must implement the method by which to increase an object&apos;s amount of experience and return if the supplied experience was enough for the object to reach a new level.<br/> */
   public boolean increaseXp(long xp); // true => level-up
} // END interface Experienceable
